import { message } from "ant-design-vue";
export const showAlert = (msg: string, status: "SUCCESS" | "ERROR" | "WARNING" | "INFO" | "LOADING" = "INFO", time: number = 3) => {
  const alertType = {
    SUCCESS: () => message.success(msg, time),
    ERROR: () => message.error(msg, time),
    WARNING: () => message.warning(msg, time),
    INFO: () => message.info(msg, time),
    LOADING: () => message.loading(msg, time),
  };
  return alertType[status]();
};
